#include <EEPROM.h>

//#define DEBUG_EEPROM

void writeEeprom(char *buf, int address) // assumes 32 byte buffer
{
	for (int i=0; i < 32; i++)
	{
		EEPROM.write(address + i, buf[i]);
	}

#ifdef DEBUG_EEPROM
	Serial.print(F("Write: ")); Serial.println(buf);
#endif
}

void readEeprom(char *buf, int address) // assumes 32 byte buffer
{
	for (int i = 0; i < 32; i++)
	{
		buf[i] = EEPROM.read(address + i);
	}

#ifdef DEBUG_EEPROM
	Serial.print(F("Read: ")); Serial.println(buf);
#endif
}